<?php

namespace app\np\controller;
use app\base\controller\Base;
use think\Request;
use think\Cache;
use think\Config;
use think\Session;


// 充值 提现记录
class Pcrunning extends Base
{
    public  $model;
    public function __construct()
    {
        $this->model = model("UsersRecharge");
        parent::__construct();
        $this->BaseWhere = ['user_id'=>$this->sidRows['id']];
    }


    /**
     *  充值记录
     */
    public function payRecord(){

        $where = [
            "type"=>1, //1入金 2出金
        ];
        $where = array_merge($this->BaseWhere,$where);
        $res =   $this->model->PcPage($where);
      if(empty($res)){
          return failJson("暂无充值记录");
      }
        return   resJson(1,$this->ecLang("query"),$res['res'],$res['pageInfo']);
    }


    /**
     *  用户提现
     */
    public function kiTing(){

        $where = [
            "type"=>2, //1入金 2出金
        ];
        $where = array_merge($this->BaseWhere,$where);
        $res =   $this->model->PcPage($where);
        if(empty($res)){
            return failJson("暂无提现记录");
        }
        return   resJson(1,$this->ecLang("query"),$res['res'],$res['pageInfo']);

    }





}
